import React, { memo } from 'react';
import { Player, BigPlayButton } from 'video-react';
import './index.css';

const VideoPlayer = function(props: any) {
  const { poster, url } = props;
  return (
    <div>
      <Player playsInline poster={poster[0].url} src={url} autoPlay>
        <BigPlayButton position="center" />
      </Player>
    </div>
  );
};

export default memo(VideoPlayer);
